<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
  </head>
  <style>
    html, body {
      width: 100%;
      height: 100%;
      padding: 0px;
      margin: 0px;
      background-color: rgb(0, 0, 0);
    }
    iframe{
      width: 1000px;
      height: 600px;
    }
  </style>
  <body>
    <iframe id="my_iframe" src="http://localhost:8080/live" frameborder="0"></iframe>
  </body>

  <script>
    document.getElementById('my_iframe').onload = function() {
      // 发送消息到Vue页面
      var iframeWindow = this.contentWindow || this.contentDocument.window;
      iframeWindow.postMessage({
        "code":'c@03403030000'
      }, '*'); // 使用Vue页面的URL
    };
  </script>
</html>
